<!--右侧内容开始-->
<div>
    <br/>
    <ol class="breadcrumb">
        <li class="active"><span class="glyphicon glyphicon-home" style="color:#23527c"></span>&nbsp;<mainpage></mainpage></li>
        <li class="active">运维工作台 / 参数配置管理 / 规则参数管理 / 短信优先级管理</li>
    </ol>
    
    <ul class="nav nav-tabs marT15">
      <li role="presentation" class="active"><a href="#/priorityManage" style="color: #555;">优先级管理</a></li>
      <li role="presentation"><a href="#/messagepriorityMent" style="color:#555;">短信优先级分配</a></li>
   </ul> 

    <div class="rightbar">
        <div id="serviceEnd" class="showEle sign1">
            <div class="left marT15 marR10">
                <span class="search-name">优先级</span>
                <select class="form-control1"  ng-model="searchData.ruleId" name="">
                    <option value="">全部</option>
                    <option value={{row.ruleId}} ng-repeat="row in levelData">{{row.level}}</option>
                </select>
            </div>
            <a ng-click="search()"  class=" btn btn-sm btn-primary left marT15"><span class="glyphicon glyphicon-search"></span></a>
            <br>
            <br>
            <!-- <input type="button" class="btn btn-primary" value="优先级增加"> -->
                <div style="color:red">* 优先级编码生效后不可修改，数字越高优先级越低</div>
        <div class="table-box">
            <table class="table table-bordered table-striped text-center bg-info marT15">
                <thead >
                <tr class="info">
                    <th class="text-center">序号</th>
                    <th class="text-center">优先级</th>
                    <th class="text-center">状态</th>
                    <th class="text-center">说明</th>
                    <th class="text-center">操作</th>
                </tr>
                </thead>
                <tbody ng-repeat="Item in result">
                <tr ng-repeart>
                    <td>{{ $index+1 }}</td>
                    <td>{{Item.level}}</td>
                    <td>
                      <span ng-if='"1"==Item.status' >有效</span>
                      <span ng-if='"0"==Item.status' >无效</span>
                    </td>
                    <td style="min-width: 200px; word-break: break-all;">{{Item.desc}}</td>
                    <td style="min-width: 160px;">
                        <a class="marR10" 
                            ng-click='changeStstus($index,Item.ruleId ,Item.status)'
                            ng-show="'0'===Item.status">生效</a>
                            <a class="marR10" 
                            ng-click='changeStstus($index,Item.ruleId ,Item.status)' 
                            ng-show="'1'===Item.status">失效</a>
                            <a class="marR10" data-toggle="modal" data-target="#add" ng-click="editTr('修改',Item.ruleId )">修改</a>
                            <a class="" data-toggle="modal" data-target="#delete" ng-click="delete(Item.ruleId ,$index)">删除
                    </a>
                    </td>
                </tr>
                </tbody>
                <tfoot>
                <tr>
                    <td><a ng-click='editTr("添加")' class="glyphicon glyphicon-plus" data-toggle="modal" data-target="#add">优先级增加</a></td>
                    <td></td>
                    <td></td>
                    <td></td>
                    <td></td>
                </tr>
                </tfoot>
             </table>
       </div>

<page></page>
        </div>
    </div>
</div>
<!--右侧内容结束-->
</div>

<!-- 修改程序弹框 -->
<!-- <div class="modal fade" id="modify" tabindex="-1" role="dialog" aria-labelledby="modify">
    <div class="modal-dialog" role="document">
         <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="">修改</h4>
            </div>
            <div class="modal-body">
               <div class="clearfix"> 
                  <span class="col-xs-6">
                       <div class="input-group  left">
                           <span class="input-group-addon">优先级</span>
                           <input type="text" class="form-control" placeholder="" ng-model="addData.level">
                       </div>
                   </span>
                   <span class="col-xs-6">
                       <div class="input-group  left">
                           <span class="input-group-addon">状态</span>
                           <select class="form-control" ng-model="addData.status">
                               <option value="0" >待生效</option>
                               <option value="1">生效</option>
                           </select>
                       </div>
                   </span>
               </div>
               <div class="marT15 marB15 clearfix">
                <span class="col-xs-12">
                       <div class="input-group  left">
                           <span class="input-group-addon">优先级管理说明</span>
                           <textarea class="left form-control" ng-model="addData.desc"></textarea>
                       </div>
                   </span> 
               </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button>
            </div>
        </div>
    </div>
</div>
</div> -->


<div class="modal fade" id="add" tabindex="-1" role="dialog" aria-labelledby="add">
    <div class="modal-dialog" role="document">
         <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="">{{popup}}优先级信息</h4>
            </div>
            <div class="modal-body">
               <div class="clearfix row"> 
                  <span class="col-xs-6 lineH25">
                      
                           <label class="left">优先级:</label>
                           <!--所有正整数-->
                           <!--oninput='this.value=this.value.replace(/^[0]+[0-9]*$/gi,"")'-->
                           <input type="number"  maxlength="5" class="form-control line4 right level" placeholder="" min="0" ng-model="addData.level">
                       
                   </span>
                   <span class="col-xs-6 lineH25">
                       
                           <label class="left">状态:</label>
                           <select class="form-control line4 right" ng-model="addData.status">
                               <option value="0" >待生效</option>
                               <option value="1">生效</option>
                           </select>
                       
                   </span>
               </div>
               <div class="marT15 marB15 clearfix">
                           <p><label>优先级管理说明:</label></p>
                           <textarea id="desc" class="left form-control col-xs-12" style="width: 540px;" ng-model="addData.desc"></textarea>

               </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default btn-sm" data-dismiss="modal">取消</button>
                <button type="button" class="btn btn-primary btn-sm" ng-click="editSave()">保存</button>
            </div>
        </div>
    </div>
</div>
</div>
<!--修改程序结束-->
<!-- 参数添加结束 -->
<!-- 提示框 -->
<div class="modal fade" id="delete">
    <div class="modal-dialog">
        <div class="modal-content message_align">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
                <h4 class="modal-title">提示信息</h4>
            </div>
            <div class="modal-body">
                <p>您确认删除吗？</p>
            </div>
            <div class="modal-footer">
                <input type="hidden" id="url"/>
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                <a  ng-click='deleteTr()' class="btn btn-primary" data-dismiss="modal">确定</a>
            </div>
        </div><!-- /.modal-content -->
    </div><!-- /.modal-dialog -->
</div><!-- /.modal -->
<!-- 提示框结束 -->
<!-- 加载框 -->
  <span class='loaded' ng-show='loaded'><img  src="img/load.gif"></span>
<!-- 加载框 完成-->